/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import { Request, Response } from 'express';
import { ResponseItem, responseSuccess } from '../utils';
import type { ListItem } from '@/pages/HandleFeedback/courier/index.d';
import Mock from 'mockjs';

export default {
  'POST /FilePrintConsumer/feedbackList': (req: Request, res: Response) => {
    const data: ListItem[] = Mock.mock({
      'list|1-30': [
        {
          id: '@id()',
          user_id: '10',
          username: '小狗',
          content: '我想反馈这个软件很好用',
          reply: '@ctitle',
          create_time: '2023-06-12 16:43:58',
          update_time: '2023-06-25 14:05:34',
          phone: '@phone',
          images: [
            'http://upload.kuaidihelp.com/file_print/feed/image/2023/062023_06/12/16486da76db350375264434.jpg',
            'http://upload.kuaidihelp.com/file_print/feed/image/2023/062023_06/12/16486daacab156035488388.png',
          ],
          type: '1',
          app: 'android app_version',
          reply_type: '1',
          reply_images: [
            'http://upload.kuaidihelp.com/file_print/feed/image/2023/062023_06/12/16486da76db350375264434.jpg',
          ],
          reply_user: '王大江',
        },
      ],
      total: 66,
    });

    const result: ResponseItem = {
      code: 0,
      msg: '成功',
      data,
    };
    return res.json(result);
  },
  'POST /FilePrintConsumer/addReplyFeedback': (req: Request, res: Response) =>
    responseSuccess(req, res),
};
